<?php
class ManualAddBookFormAddNew extends Zend_Form {
	
	private $ISBN;
	
	public function ManualAddBookFormAddNew($ISBN) {
		$this->ISBN = $ISBN;
		$this->__construct();
	}
	
	public function init() {
		
		$this->setMethod("POST");
        $this->setName("ManualAddBook");
        
        $config = Zend_Registry::get("config");
        
        $element = new Zend_Form_Element_Hidden("baseurl");
        $element->setValue($config->baseurl);
        $this->addElement($element);
        
        $element = new Zend_Form_Element_Hidden("source");
        $element->setValue(BookSource::MANUAL);
        $this->addElement($element);
        
        $element = new Zend_Form_Element_Text("ISBN");
        $element->setLabel("ISBN:");
        $element->setDescription("ISBN");
        $element->setValue($this->ISBN);
        $element->setAttrib("readonly", "readonly");
        $this->addElement($element);
        
        $element = new Zend_Form_Element_Text("name");
        $element->setLabel("Title:");
        $element->setDescription("Book name.");
        $this->addElement($element);
        
		
        $this->addDisplayGroup(array('name'),'alternative');
        
        $element = new Zend_Form_Element_Submit("continue");
        $this->addElement($element);
        
	}
}
?>